package config

import (
	"context"
	"gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/dao/model/config"
	schema "gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/dao/schema/config"
	"gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/svc"
)

type InoutService struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

func NewInoutService(ctx context.Context, svcCtx *svc.ServiceContext) *InoutService {
	return &InoutService{
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (c *InoutService) GetConfigType(typeId int64) (*schema.ConfigInoutType, error) {
	return config.NewInoutModel(c.ctx, c.svcCtx.Db).FindByTypeId(typeId)
}
